/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ufc.quixada.adrs.service;

import br.ufc.quixada.adrs.dao.QuestionarioSanitarioDAO;
import br.ufc.quixada.adrs.model.QuestionarioSanitario;
import br.ufc.quixada.adrs.util.Msg;
import java.sql.SQLException;
import org.slf4j.LoggerFactory;

/**
 *
 * @author Caio
 */
public class QuestionarioSanitarioService {

    private final QuestionarioSanitarioDAO dao = new QuestionarioSanitarioDAO();

    QuestionarioSanitario getQuestionarioSanitarioByVisitaId(Long id) {
        try {
            QuestionarioSanitario qs = dao.getByVisitaId(id);
            return qs;
        } catch (SQLException ex) {
            LoggerFactory.getLogger(this.getClass()).error(Msg.EXCEPTION_MESSAGE, this.getClass().getSimpleName(), ex);
            return null;
        }
    }
}
